Skip to content

Birmingham | 26-ITP-May | Gabriel Pawuoi| Sprint 2 | Coursework #1467

Open
KhotKeys wants to merge 1 commit into
CodeYourFuture:mainfrom
KhotKeys:sprint-2
Open

Birmingham | 26-ITP-May | Gabriel Pawuoi| Sprint 2 | Coursework #1467
KhotKeys wants to merge 1 commit into
CodeYourFuture:mainfrom
KhotKeys:sprint-2

Conversation

@KhotKeys

@KhotKeys KhotKeys commented Jul 5, 2026

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

completed all mandatory and stretch

@github-actions

This comment has been minimized.

@KhotKeys KhotKeys added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jul 5, 2026
@Liam310 Liam310 added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 6, 2026
Comment on lines +27 to +34
// b) num = 0 (totalHours) when pad is called for the first time.

// Call formatTimeDisplay with an input of 61, now answer the following:
// c) pad(0): "0".length < 2, so prepend "0" -> "00". Return value: "00"

// b) What is the value assigned to num when pad is called for the first time?
// =============> write your answer here
// d) num = 1 (remainingSeconds) when pad is called for the last time.
// It is the last argument passed in the template literal.

// c) What is the return value of pad is called for the first time?
// =============> write your answer here

// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
// =============> write your answer here

// e) What is the return value of pad when it is called for the last time in this program? Explain your answer
// =============> write your answer here
// e) pad(1): "1".length < 2, so prepend "0" -> "01". Return value: "01"

@Liam310 Liam310 Jul 6, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These answers are good, but it could be a little confusing to gauge the answers mean without the context of the questions since you deleted them. This is somewhat true of the other questions as well, it's not the end of the world but bear in mind that if you were to ever look back on this repo, you'd have to look at the commits to see the diffs (i.e. what we can see right now in GitHub) in order to understand the work.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: you don't need to do anything in response to this comment, but I just wanted to highlight it for your own reference in case you should want to do anything.

@Liam310 Liam310 added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 6, 2026

function capitalise(str) {
let str = `${str[0].toUpperCase()}${str.slice(1)}`;
str = `${str[0].toUpperCase()}${str.slice(1)}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we reassign the value of a variable if we want to update the value whilst the recognising that what the value represents has stayed the same. Here, you're reassigning str to be something that represents a different thing. Considering this, can you think of an alternative approach to reassigning the existing str variable that would make this a little bit more readable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants